<script setup lang="ts">
import type { MedicinesRes } from '@/types/medicine'

defineProps<{
  medicineDetail: MedicinesRes
}>()
</script>

<template>
  <van-cell-group>
    <van-cell
      title="药品金额"
      :value="`￥${medicineDetail?.actualPayment.toFixed(2)}`"
    ></van-cell>
    <van-cell
      title="运费"
      :value="`￥${medicineDetail?.expressFee}`"
    ></van-cell>
    <van-cell
      title="优惠券"
      :value="`-￥${medicineDetail?.couponDeduction}`"
    ></van-cell>
    <van-cell
      title="实付款"
      :value="`￥${medicineDetail?.actualPayment}`"
      class="red"
    ></van-cell>
  </van-cell-group>
</template>

<style lang="scss" scoped>
$price_red: #eb5757;
.red {
  :deep(.van-cell__value) {
    color: $price_red;
  }
}
</style>
